﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace ShowDBPool
{
    class Program
    {
        static void Main(string[] args)
        {
            DBPool dbpool = new DBPool("server=192.168.8.88;database=cypwcfdb;uid=sa;pwd=zaq123__;", 0, 1);

            for (int i = 0; i < 1000; i++)
            {

                SqlConnection conn = dbpool.GetConnection();
                DataSet ds = SqlHelper.ExecuteDataset(conn, CommandType.Text, "select * from tbwcfsvc;");

                Console.WriteLine(ds.Tables.Count);
                Console.WriteLine(ds.Tables[0].Rows.Count);


            }
            //SqlConnection conn = dbpool.GetConnection();
            //DataSet ds = SqlHelper.ExecuteDataset(conn, CommandType.Text, "select * from tbwcfsvc;");

            //Console.WriteLine(ds.Tables.Count);
            //Console.WriteLine(ds.Tables[0].Rows.Count);

            Console.ReadLine();
        }
    }
}
